import { View, Text, Input } from '@tarojs/components'
import Taro, { useLoad } from '@tarojs/taro'
import './index.scss'


export default function DonateJiFen () {
  function submit(){
    Taro.showToast({
      title: '提交成功',
      icon: 'none'
    })
  }
  useLoad(() => {
    console.log('Page loaded.')
  })

  return (
    <View className='donateJiFen'>
      <View className="points-wrap">
        <View className='points-item'>
          <View className='label'>可用积分</View>
          <View className='value'>
            <Text className='num'>17171</Text>分
          </View>
        </View>
        <View className='points-item'>
          <View className='label'>可用积分</View>
          <View className='value'>
            <Input placeholder='请输入要捐赠的积分'></Input>
          </View>
        </View>
      </View>
      <View className='rules mt32'>
        <View className='rule-item'>捐赠原则</View>
        <View className='rule-item'>
          1.捐赠积分行为属于自主意愿，捐赠行为一经确认，无法撤销
        </View>
        <View className='rule-item'>
          2.您捐赠的积分仅可用于符合条件的受助对象代缴基本医疗保险，不可挪作其他用途
        </View>
        <View className='rule-item'>
          3.平台将公布捐赠积分的使用去向，同时严格保护捐赠人以及受助者的个人隐私信息
        </View>
      </View>
      <View className='fixed-bottom-btn' onClick={submit}>
        提交
      </View>
    </View>
  )
}
